Skip to content

Conversation

@ScottDugas
Copy link
Collaborator

It was unnecessary to have the ResolvedKeySpacePath, and we want to be able to import into a different cluster, where the resolved values are different from the exported data.
This means that DataInKeySpacePath has a few more fields, but makes it more versatile going forward.
This also changes exportAllData to use mapPipelined to resolve the path, so that DataInKeySpacePath does not contain a future.

This is in support of #3573

…edKeySpacePath

It was unnecessary to have the ResolvedKeySpacePath, and we want to
be able to import into a different cluster, where the resolved values
are different from the exported data.
This means that DataInKeySpacePath has a few more fields,
but makes it more versatile going forward.
@ScottDugas ScottDugas added the breaking change Changes that are not backwards compatible label Nov 3, 2025

public CompletableFuture<ResolvedKeySpacePath> getResolvedPath() {
return resolvedPath;
this.value = value;
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of copying the byte[] here and in getValue, I created an issue to convert it to ByteString: #3717

@ScottDugas ScottDugas marked this pull request as ready for review November 3, 2025 19:36
* @return a future that completes with the resolved path including the remainder
*/
@Nonnull
public CompletableFuture<ResolvedKeySpacePath> getResolvedPath(@Nonnull FDBRecordContext context) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where is this going to be used? Is this intended for future (import)?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this was added to make the tests keep working, but the tests have been updated since then, and so it makes sense to remove the last usage.

*/
@Nonnull
public CompletableFuture<ResolvedKeySpacePath> getResolvedPath(@Nonnull FDBRecordContext context) {
return path.toResolvedPathAsync(context)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

path.toResolvedPathAsync can be removed from the interface (only called internally)?

* @return a new {@code ResolvedKeySpacePath} that is the same as this, except with a different {@link #getRemainder()}.
*/
@Nonnull
@VisibleForTesting
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if getResolvedPath is removed from DataInKeyspacePath, then maybe this method can be removed as well (or stay as VisibleForTesting?)

This is only needed by KeySpacePathImpl.exportAllData, so lets not
pollute the interface until needed.
I kept the tests around because I think that gives some extra
coverage in a nicer way than having it all on exportAllData.
No production code is using it anymore.

We could inline it, but I feel like keeping the constructor private
is more valuable.
@ScottDugas ScottDugas merged commit 58205df into FoundationDB:main Nov 7, 2025
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

breaking change Changes that are not backwards compatible

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants